#include<iostream>


class Drink
{
public:
    virtual void Boil()=0;//烧水
    virtual void Brew()=0;//冲泡
    virtual void Put()=0;//放入辅料
    void MakeDrink()
    {
        Boil();
        Brew();
        Put();
    }



};

class MilkTea:public Drink
{
    public:
    virtual void Boil()
    {
        std::cout<<"烧开水\n";
    }
    virtual void Brew()
    {
        std::cout<<"倒入奶茶粉搅拌\n";
    }
    virtual void Put()
    {
        std::cout<<"放入椰果\n";
    }
};
class Coffee:public Drink
{
    public:
    virtual void Boil()
    {
        std::cout<<"烧开水\n";
    }
    virtual void Brew()
    {
        std::cout<<"倒入咖啡粉搅拌\n";
    }
    virtual void Put()
    {
        std::cout<<"放入冰块\n";
    }
};

int main()
{
    Drink *d=new MilkTea;
    d->MakeDrink();
    return 0;
}